
//左侧饼图
var  color =["#ffe34e",  "#93dd6e", "#ff8700"]; // ["#00a9e1","#0046af","#360293","#560081","#af0058", "#ff8700", "#ffe34e", "#93dd6e"];

var pieData=[
    {value: 15050979, name: "4G"},
    {value: 5757478, name: "2G/3G"},
    {value: 2154138, name: "WLAN"},
]
var count = 0;
for(var i=0;i<pieData.length;i++){
	count +=pieData[i].value;
}
var legend=['4G','2G/3G','WLAN']
var pie3Opt = {
    color:color,
    backgroundColor: 'transparent',
    legend: {
        orient: 'horizontal',
        top: '85%',
        data:legend,
        textStyle:{
            color:'#fff'
        }
    },
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)",
        position:'right'
    },
    series: [{
        name: '',
        type: 'pie',
        radius: ['45%', '60%'],
        center: ['45%', '45%'],
        hoverAnimation: true,
        label: {
            normal: {
                show: false,
                position: 'center'
            },
            emphasis: {
                show: false,
                textStyle: {
                    fontSize: '30',
                    fontWeight: 'bold'
                }
            }
        },
        data: pieData
    },{
        name: '',
        type: 'pie',
        clockWise: true,
        hoverAnimation: false,
        animationType: 'scale',
        radius: [200, 200],
        center: ['45%', '45%'],
        label: {
            normal: {
                position: 'center'
            }
        },
        data: [{
            value: 0,
            label: {
                normal: {
                    formatter: '38',
                    textStyle: {
                        color: '#20fd07',
                        fontSize: 25,
                        fontWeight: 'bold'
                    }
                }
            }
        }, {
            tooltip: {
                show: false
            },
            label: {
                normal: {
                    textStyle: {
                        color: '#bbeaf9',
                        fontSize: 12
                    }
                }
            }
        }]
    }]
};
var pie3Chart = echarts.init(document.getElementById('logPie'))
pie3Chart.setOption(pie3Opt)
window.addEventListener("resize", function () {
    pie3Chart.resize();
});
var pieIndex = 0
var pieAutoShow = function(){
    if (pieIndex >2){
        pieIndex = 0
    }
    for (var i = 0;i <3;i++){
        if (i != pieIndex){
            pie3Opt.series[0].data[i]['selected'] = false;
        }else{
            pie3Opt.series[0].data[i]['selected'] = true;
        }
    }
    pie3Opt.series[1].data[0].label.normal.formatter = parseInt(pie3Opt.series[0].data[pieIndex].value/count*100)+ "%"
    pie3Opt.series[1].data[1].label.normal.formatter = "\n" + pie3Opt.series[0].data[pieIndex].name
    pie3Chart.setOption(pie3Opt)
    pieIndex++
    setTimeout(pieAutoShow,1200)
}
pieAutoShow()

//地图
var mapData=[
    {name: '北京',value: 2016476},
    {name: '天津',value: 187907},
    {name: '上海',value: 238433},
    {name: '重庆',value: 2751420 },
    {name: '河北',value: 800439},
    {name: '河南',value: 1776418},
    {name: '云南',value: 1695074},
    {name: '辽宁',value: 89262},
    {name: '黑龙江',value: 594057},
    {name: '湖南',value: 86780130},
    {name: '安徽',value: 298414},
    {name: '山东',value: 19794},
    {name: '新疆',value: 2246216},
    {name: '江苏',value: 14889534},
    {name: '浙江',value: 1055517},
    {name: '江西',value: 1018176},
    {name: '湖北',value: 1192406},
    {name: '广西',value: 2397012},
    {name: '甘肃',value: 970434},
    {name: '山西',value: 1074179},
    {name: '内蒙古',value: 128503},
    {name: '陕西',value: 0},
    {name: '吉林',value: 312070},
    {name: '福建',value: 1739807},
    {name: '贵州',value: 1324661},
    {name: '广东',value: 725804},
    {name: '青海',value: 615938},
    {name: '西藏',value: 393826},
    {name: '四川',value: 1186520},
    {name: '宁夏',value: 206291},
    {name: '海南',value: 328820},
    {name: '台湾',value: 0},
    {name: '香港',value: 0},
    {name: '澳门',value: 0}
]

var mapData1=[
    {name: '北京',value: 86.26},
    {name: '天津',value: 89.87},
    {name: '上海',value: 94.33},
    {name: '重庆',value: 98.28},
    {name: '河北',value: 85.29},
    {name: '河南',value: 90.75},
    {name: '云南',value: 98.10},
    {name: '辽宁',value: 72.12},
    {name: '黑龙江',value: 95.91},
    {name: '湖南',value: 94.68},
    {name: '安徽',value: 86.52},
    {name: '山东',value: 99.71},
    {name: '新疆',value: 87.28},
    {name: '江苏',value: 92.31},
    {name: '浙江',value: 86.56},
    {name: '江西',value: 84.69},
    {name: '湖北',value: 86.94},
    {name: '广西',value: 90.85},
    {name: '甘肃',value: 85.47},
    {name: '山西',value: 93.61},
    {name: '内蒙古',value: 97.56},
    {name: '陕西',value: 0},
    {name: '吉林',value: 98.24},
    {name: '福建',value: 48.51},
    {name: '贵州',value: 90.99},
    {name: '广东',value: 89.47},
    {name: '青海',value: 98.90},
    {name: '西藏',value: 73.40},
    {name: '四川',value: 94.44},
    {name: '宁夏',value: 97.44},
    {name: '海南',value: 94.04},
    {name: '台湾',value: 0},
    {name: '香港',value: 0},
    {name: '澳门',value: 0}
]

var geoCoordMap={}
var mapFeatures = echarts.getMap('china').geoJson.features;
mapFeatures.forEach(function(v) {
    // 地区名称
    var name = v.properties.name;
    // 地区经纬度
    geoCoordMap[name] = v.properties.cp;
});
var convertData = function (data) {
    var res = [];
    for (var i = 0; i < data.length; i++) {
        var geoCoord = geoCoordMap[data[i].name];
        if (geoCoord) {
            res.push({
                name: data[i].name,
                value: geoCoord.concat(data[i].value)
            });
        }
    }
    return res;
};

var optionMap = {
	tooltip : {
        trigger: 'item',
        formatter:function(param){
        	var data = null;
        	var name = param.name;
        	if(name == '北京'){
        		data = [2016476,86.26,603170,90.96,7788049,87.61];
        	}else if(name == '天津'){
        		data = [187907,89.87,69416,99.77,565149,74.66];
        	}else if(name == '上海'){
        		data = [238433,94.33,475809,97.70,322831,85.45];
        	}else if(name == '重庆'){
        		data = [2751420,98.28,1758862,98.77,1734592,98.77];
        	}else if(name == '河北'){
        		data = [800439,85.29,776676,86.69,183881,94.45];
        	}else if(name == '河南'){
        		data = [1776418,90.75,548135,98.42,1453445,95.69];
        	}else if(name == '云南'){
        		data = [1695074,98.10,182776,96.16,173930,98.23];
        	}else if(name == '辽宁'){
        		data = [89262,72.12,4173839,85.30,28490,100.00];
        	}else if(name == '黑龙江'){
        		data = [594057,95.91,561546,96.13,0,0.00];
        	}else if(name == '湖南'){
        		data = [86780130,94.68,690992,96.00,1100526,94.45];
        	}else if(name == '安徽'){
        		data = [298414,86.52,415632,89.95,329891,90.55];
        	}else if(name == '山东'){
        		data = [19794,99.71,361039,86.14,161453,94.69];
        	}else if(name == '新疆'){
        		data = [2246216,87.28,1290625,89.79,421977,90.72];
        	}else if(name == '江苏'){
        		data = [14889534,92.31,898252,99.88,886254,92.04];
        	}else if(name == '浙江'){
        		data = [1055517,86.56,651196,93.42,1565938,86.79];
        	}else if(name == '江西'){
        		data = [1018176,84.69,112871,97.35,88624,75.68];
        	}else if(name == '湖北'){
        		data = [1192406,86.94,741451,97.80,953047,89.14];
        	}else if(name == '广西'){
        		data = [2397012,90.85,333837,91.09,108642,83.42];
        	}else if(name == '甘肃'){
        		data = [970434,85.47,289276,94.61,1173098,90.99];
        	}else if(name == '山西'){
        		data = [1074179,93.61,112928,99.49,4958,100.00];
        	}else if(name == '内蒙古'){
        		data = [128503,97.56,332640,90.99,15743,94.39];
        	}else if(name == '陕西'){
        		data = [0,0.00,0,0.00,168881,88.30];
        	}else if(name == '吉林'){
        		data = [312070,98.24,332031,81.75,543598,85.99];
        	}else if(name == '福建'){
        		data = [1739807,48.51,576517,47.01,1765932,66.55];
        	}else if(name == '贵州'){
        		data = [1324661,90.99,1239405,89.70,921528,84.93];
        	}else if(name == '广东'){
        		data = [725804,89.47,333395,89.41,7488799,74.24];
        	}else if(name == '青海'){
        		data = [615938,98.90,98728,99.99,345441,91.31];
        	}else if(name == '西藏'){
        		data = [393826,73.40,5975458,56.57,151205,98.54];
        	}else if(name == '四川'){
        		data = [1186520,94.44,0,0.00,0,0.00];
        	}else if(name == '宁夏'){
        		data = [206291,97.44,200336,99.84,49513,95.64];
        	}else if(name == '海南'){
        		data = [328820,94.04,253454,92.26,247715,92.10];
        	}
            return '<div>'+param.name+'</div>'+
            	   '<div>移动拨测数：'+data[0]+'</div>'+
            	   '<div>联通拨测数：'+data[2]+'</div>'+
            	   '<div>电信拨测数：'+data[4]+'</div>';
        }
    },
	geo : {
		show : true,
		zoom : 1.2,
		roam : false,
		map : 'china',
		itemStyle : {
			normal : {
				show : false,
				borderColor : '#285ac6',
				borderWidth : 1,
				areaColor : '#123082',
				shadowBlur : 3,
				shadowColor : '#081435',
				shadowOffsetX : -4,
				shadowOffsetY : 8
			},
			emphasis : {
				areaColor : '#fce24f',
				borderColor : '#fce24f'
			}
		}
	},
	series : [ {
		type : 'map',
		zoom : 1.2,
		mapType : 'china',
		// geoIndex: 0,
		roam : false,
		label : {
			normal : {
				show : false,
				textStyle : {
					color : '#fff'
				}
			},
			emphasis : {
				show : true,
				textStyle : {
					color : '#fff'
				}
			}
		},
		itemStyle : {
			normal : {
				show : false,
				borderColor : '#3770ea',
				borderWidth : 1,
				areaColor : '#0f2d87'
			},
			emphasis : {
				areaColor : '#2a56bd',
				borderColor : '#2a56bd',
			// opacity: 0.8,
			}
		},
		data : convertData(mapData)
	}, {
		name : 'Top 5',
		type : 'effectScatter',
		zlevel : 1,
		coordinateSystem : 'geo',
		symbolSize : function(val) {
			return val[2] / 86780130 * 10 + 15
		},
		showEffectOn : 'render',
		rippleEffect : {
			brushType : 'stroke'
		},
		hoverAnimation : true,
		label : {
			normal : {
				// formatter: '{b}',
				position : 'right',
				show : false
			}
		},
		itemStyle : {
			normal : {
				color : '#f4e925',
				shadowBlur : 10,
				shadowColor : '#333'
			}
		},
		data : convertData(mapData.sort(function(a, b) {
			return b.value - a.value
		}).slice(0, 5))
	}, {
		name : 'Top 5',
		type : 'scatter',
		zlevel : 1,
		coordinateSystem : 'geo',
		symbolSize : function(val) {
			// return val*4+8;
			return val[2] / 86780130 * 25 + 10
		},
		showEffectOn : 'render',
		rippleEffect : {
			brushType : 'stroke'
		},
		hoverAnimation : true,
		label : {
			normal : {
				// formatter: '{b}',
				position : 'right',
				show : false
			}
		},
		itemStyle : {
			normal : {
				color : '#f4e925',
				shadowBlur : 10,
				shadowColor : '#333'
			}
		},
		// data: convertData(mapData)
		data : convertData(mapData.sort(function(a, b) {
			return b.value - a.value;
		}).slice(5))
	} ]
};

function getLogChina(){
	var optionMap = {
			tooltip : {
		        trigger: 'item',
		        formatter:function(param){
		        	var data = null;
		        	var name = param.name;
		        	if(name == '北京'){
		        		data = [2016476,86.26,603170,90.96,7788049,87.61];
		        	}else if(name == '天津'){
		        		data = [187907,89.87,69416,99.77,565149,74.66];
		        	}else if(name == '上海'){
		        		data = [238433,94.33,475809,97.70,322831,85.45];
		        	}else if(name == '重庆'){
		        		data = [2751420,98.28,1758862,98.77,1734592,98.77];
		        	}else if(name == '河北'){
		        		data = [800439,85.29,776676,86.69,183881,94.45];
		        	}else if(name == '河南'){
		        		data = [1776418,90.75,548135,98.42,1453445,95.69];
		        	}else if(name == '云南'){
		        		data = [1695074,98.10,182776,96.16,173930,98.23];
		        	}else if(name == '辽宁'){
		        		data = [89262,72.12,4173839,85.30,28490,100.00];
		        	}else if(name == '黑龙江'){
		        		data = [594057,95.91,561546,96.13,0,0.00];
		        	}else if(name == '湖南'){
		        		data = [86780130,94.68,690992,96.00,1100526,94.45];
		        	}else if(name == '安徽'){
		        		data = [298414,86.52,415632,89.95,329891,90.55];
		        	}else if(name == '山东'){
		        		data = [19794,99.71,361039,86.14,161453,94.69];
		        	}else if(name == '新疆'){
		        		data = [2246216,87.28,1290625,89.79,421977,90.72];
		        	}else if(name == '江苏'){
		        		data = [14889534,92.31,898252,99.88,886254,92.04];
		        	}else if(name == '浙江'){
		        		data = [1055517,86.56,651196,93.42,1565938,86.79];
		        	}else if(name == '江西'){
		        		data = [1018176,84.69,112871,97.35,88624,75.68];
		        	}else if(name == '湖北'){
		        		data = [1192406,86.94,741451,97.80,953047,89.14];
		        	}else if(name == '广西'){
		        		data = [2397012,90.85,333837,91.09,108642,83.42];
		        	}else if(name == '甘肃'){
		        		data = [970434,85.47,289276,94.61,1173098,90.99];
		        	}else if(name == '山西'){
		        		data = [1074179,93.61,112928,99.49,4958,100.00];
		        	}else if(name == '内蒙古'){
		        		data = [128503,97.56,332640,90.99,15743,94.39];
		        	}else if(name == '陕西'){
		        		data = [0,0.00,0,0.00,168881,88.30];
		        	}else if(name == '吉林'){
		        		data = [312070,98.24,332031,81.75,543598,85.99];
		        	}else if(name == '福建'){
		        		data = [1739807,48.51,576517,47.01,1765932,66.55];
		        	}else if(name == '贵州'){
		        		data = [1324661,90.99,1239405,89.70,921528,84.93];
		        	}else if(name == '广东'){
		        		data = [725804,89.47,333395,89.41,7488799,74.24];
		        	}else if(name == '青海'){
		        		data = [615938,98.90,98728,99.99,345441,91.31];
		        	}else if(name == '西藏'){
		        		data = [393826,73.40,5975458,56.57,151205,98.54];
		        	}else if(name == '四川'){
		        		data = [1186520,94.44,0,0.00,0,0.00];
		        	}else if(name == '宁夏'){
		        		data = [206291,97.44,200336,99.84,49513,95.64];
		        	}else if(name == '海南'){
		        		data = [328820,94.04,253454,92.26,247715,92.10];
		        	}
		            return '<div>'+param.name+'</div>'+
		            	   '<div>移动拨测成功率：'+data[1]+'%</div>'+
		            	   '<div>联通拨测成功率：'+data[3]+'%</div>'+
		            	   '<div>电信拨测成功率：'+data[5]+'%</div>';
		        }
		    },
			geo : {
				show : true,
				zoom : 1.2,
				roam : false,
				map : 'china',
				itemStyle : {
					normal : {
						show : false,
						borderColor : '#285ac6',
						borderWidth : 1,
						areaColor : '#123082',
						shadowBlur : 3,
						shadowColor : '#081435',
						shadowOffsetX : -4,
						shadowOffsetY : 8
					},
					emphasis : {
						areaColor : '#fce24f',
						borderColor : '#fce24f'
					}
				}
			},
			series : [ {
				type : 'map',
				zoom : 1.2,
				mapType : 'china',
				// geoIndex: 0,
				roam : false,
				label : {
					normal : {
						show : false,
						textStyle : {
							color : '#fff'
						}
					},
					emphasis : {
						show : true,
						textStyle : {
							color : '#fff'
						}
					}
				},
				itemStyle : {
					normal : {
						show : false,
						borderColor : '#3770ea',
						borderWidth : 1,
						areaColor : '#0f2d87'
					},
					emphasis : {
						areaColor : '#2a56bd',
						borderColor : '#2a56bd',
					// opacity: 0.8,
					}
				},
				data : convertData(mapData1)
			}, {
				name : 'Top 5',
				type : 'effectScatter',
				zlevel : 1,
				coordinateSystem : 'geo',
				symbolSize : function(val) {
					return val[2] / 100 * 10 + 10 
				},
				showEffectOn : 'render',
				rippleEffect : {
					brushType : 'stroke'
				},
				hoverAnimation : true,
				label : {
					normal : {
						// formatter: '{b}',
						position : 'right',
						show : false
					}
				},
				itemStyle : {
					normal : {
						color : '#f4e925',
						shadowBlur : 10,
						shadowColor : '#333'
					}
				},
				// data: convertData(mapData)
				data : convertData(mapData1.sort(function(a, b) {
					return b.value - a.value
				}).slice(0, 5))
			}, {
				name : 'Top 5',
				type : 'scatter',
				zlevel : 1,
				coordinateSystem : 'geo',
				symbolSize : function(val) {
					return val[2] / 100 * 10 + 5 
				},
				showEffectOn : 'render',
				rippleEffect : {
					brushType : 'stroke'
				},
				hoverAnimation : true,
				label : {
					normal : {
						// formatter: '{b}',
						position : 'right',
						show : false
					}
				},
				itemStyle : {
					normal : {
						color : '#f4e925',
						shadowBlur : 10,
						shadowColor : '#333'
					}
				},
				// data: convertData(mapData)
				data : convertData(mapData1.sort(function(a, b) {
					return b.value - a.value;
				}).slice(5))
			} ]
	};
	return optionMap;
}

var mapChart = echarts.init(document.getElementById('logChina'))
mapChart.setOption(optionMap)
window.addEventListener("resize", function () {
    mapChart.resize();
});

function tab1(that){
	$(that).addClass("active").siblings().removeClass("active");
	mapChart.setOption(optionMap);
}

function tab2(that){
	$(that).addClass("active").siblings().removeClass("active");
	mapChart.setOption(getLogChina());
}

function getComListInfo(province,data1,data2,data3,data4,data5,data6){
	$('.com_list').empty();
	$('.com_list').append('<li><div>'+province+'移动拨测数<br><strong>'+data1+'</strong>次</div> <div>留存率<br><strong>'+data2+'</strong>%</div></li>')
				  .append('<li><div>'+province+'联通拨测数<br><strong>'+data3+'</strong>次</div> <div>留存率<br><strong>'+data4+'</strong>%</div></li>')
				  .append('<li><div>'+province+'电信拨测数<br><strong>'+data5+'</strong>次</div> <div>留存率<br><strong>'+data6+'</strong>%</div></li>');
}

mapChart.on('click',function(param){
	var name = param.name;
	/*选中不动for(var i=0;i<mapData.length;i++){
		if(mapData[i].name == name){
			mapData[i].selected = true;
		}else{
			mapData[i].selected = false;
		}
	}
	mapChart.setOption(optionMap);*/
	if(name == '北京'){
		getComListInfo(name,2016476,86.26,603170,90.96,7788049,87.61);
	}else if(name == '天津'){
		getComListInfo(name,187907,89.87,69416,99.77,565149,74.66);
	}else if(name == '上海'){
		getComListInfo(name,238433,94.33,475809,97.70,322831,85.45);
	}else if(name == '重庆'){
		getComListInfo(name,2751420,98.28,1758862,98.77,1734592,98.77);
	}else if(name == '河北'){
		getComListInfo(name,800439,85.29,776676,86.69,183881,94.45);
	}else if(name == '河南'){
		getComListInfo(name,1776418,90.75,548135,98.42,1453445,95.69);
	}else if(name == '云南'){
		getComListInfo(name,1695074,98.10,182776,96.16,173930,98.23);
	}else if(name == '辽宁'){
		getComListInfo(name,89262,72.12,4173839,85.30,28490,100.00);
	}else if(name == '黑龙江'){
		getComListInfo(name,594057,95.91,561546,96.13,0,0.00);
	}else if(name == '湖南'){
		getComListInfo(name,86780130,94.68,690992,96.00,1100526,94.45);
	}else if(name == '安徽'){
		getComListInfo(name,298414,86.52,415632,89.95,329891,90.55);
	}else if(name == '山东'){
		getComListInfo(name,19794,99.71,361039,86.14,161453,94.69);
	}else if(name == '新疆'){
		getComListInfo(name,2246216,87.28,1290625,89.79,421977,90.72);
	}else if(name == '江苏'){
		getComListInfo(name,14889534,92.31,898252,99.88,886254,92.04);
	}else if(name == '浙江'){
		getComListInfo(name,1055517,86.56,651196,93.42,1565938,86.79);
	}else if(name == '江西'){
		getComListInfo(name,1018176,84.69,112871,97.35,88624,75.68);
	}else if(name == '湖北'){
		getComListInfo(name,1192406,86.94,741451,97.80,953047,89.14);
	}else if(name == '广西'){
		getComListInfo(name,2397012,90.85,333837,91.09,108642,83.42);
	}else if(name == '甘肃'){
		getComListInfo(name,970434,85.47,289276,94.61,1173098,90.99);
	}else if(name == '山西'){
		getComListInfo(name,1074179,93.61,112928,99.49,4958,100.00);
	}else if(name == '内蒙古'){
		getComListInfo(name,128503,97.56,332640,90.99,15743,94.39);
	}else if(name == '陕西'){
		getComListInfo(name,0,0.00,0,0.00,168881,88.30);
	}else if(name == '吉林'){
		getComListInfo(name,312070,98.24,332031,81.75,543598,85.99);
	}else if(name == '福建'){
		getComListInfo(name,1739807,48.51,576517,47.01,1765932,66.55);
	}else if(name == '贵州'){
		getComListInfo(name,1324661,90.99,1239405,89.70,921528,84.93);
	}else if(name == '广东'){
		getComListInfo(name,725804,89.47,333395,89.41,7488799,74.24);
	}else if(name == '青海'){
		getComListInfo(name,615938,98.90,98728,99.99,345441,91.31);
	}else if(name == '西藏'){
		getComListInfo(name,393826,73.40,5975458,56.57,151205,98.54);
	}else if(name == '四川'){
		getComListInfo(name,1186520,94.44,0,0.00,0,0.00);
	}else if(name == '宁夏'){
		getComListInfo(name,206291,97.44,200336,99.84,49513,95.64);
	}else if(name == '海南'){
		getComListInfo(name,328820,94.04,253454,92.26,247715,92.10);
	}
});

//右下折线图
var series1=[
    {
        name:'移动',
        type:'line',
        smooth: 'true',
        symbol:'none',  //这句就是去掉点的
        areaStyle: {
            normal: {
                opacity: 0
            }
        },
        data:[94.57,95.87,93.53,93.90,90.26,94.40,95.01,96.34]
    },
    {
        name:'联通',
        type:'line',
        smooth: 'true',
        symbol:'none',  //这句就是去掉点的
        areaStyle: {
            normal: {
                opacity: 0
            }
        },
        data:[77.57,82.56,80.51,91.95,90.50,87.03,84.25,69.35]
    },{
        name:'电信',
        type:'line',
        smooth: 'true',
        symbol:'none',  //这句就是去掉点的
        areaStyle: {
            normal: {
                opacity: 0
            }
        },
        data:[78.18,72.44,86.89,85.45,94.61,93.06,82.68,84.48]
    }
]
lineEvt(series1,"logOper",['移动','联通','电信'])
var series2=[
    {
        name:'4G',
        type:'line',
        smooth: 'true',
        symbol:'none',  //这句就是去掉点的
        areaStyle: {
            normal: {
                opacity: 0
            }
        },
        data:[10.00,86.04,89.92,90.99,90.32,89.67,93.14,93.38]
    },{
        name:'2/3G',
        type:'line',
        smooth: 'true',
        symbol:'none',  //这句就是去掉点的
        areaStyle: {
            normal: {
                opacity: 0
            }
        },
        data:[0,83.83,87.17,89.16,81.47,89.53,89.31,83.39]
    },{
        name:'WLAN',
        type:'line',
        smooth: 'true',
        symbol:'none',  //这句就是去掉点的
        areaStyle: {
            normal: {
                opacity: 0
            }
        },
        data:[0,88.23,86.61,93.66,78.12,99.53,74.09,83.73]
    }
]
lineEvt(series2,"logSurfType",['4G','2/3G','WLAN'])

function lineEvt(series,ele,legend){
    var  color = [
        "#00ef0b",
        "#00d1e9",
        "#e96800",
        "#e90079",
    ];
    var timeData= ['2016Q1','2016Q2','2016Q3','2016Q4','2017Q1','2017Q2','2017Q3','2017Q4']
    var lineOption = {
        color:color,
        tooltip : {
            trigger: 'axis',
            formatter:function(params){
            	var str = "";
            	if(params[0]){
            		str += params[0].axisValueLabel+"<br/>";	
            	}
            	$.each(params,function(index,value){
            		str += value.marker+""+value.seriesName+"："+value.value+"%<br/>";
            	});
            	//console.log(params);
            	return str;
            }
        },
        legend: {
        	show:true,
        	textStyle:{
        		color:'#fff'
        	},
            data:legend
        },
        grid: {
            top:30,
            left: '0%',
            right: '5%',
            bottom: 30,
            containLabel: true
        },
        xAxis: {
            boundaryGap : false,
            type: 'category',
            splitLine:{    //grid区域分隔线
                show:false,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#2a3f7e"
                }
            },
            axisLabel: {  //坐标轴标签
                show: true,
                formatter: '{value}',
                textStyle: {
                    color: '#0d7790'
                }
            },
            axisTick: {
                show: true   //刻度线
            },
            axisLine:{
                show: true,   //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#fff"
                }
            },
            data : timeData
        },
        yAxis : {
            splitLine:{    //grid区域分隔线
                show:true,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#2a3f7e"
                }
            },
            axisTick: {
                show: true   //刻度线
            },
            axisLine: {
                show: true ,  //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#fff"
                }
            },
            axisLabel: {  //坐标轴标签
                show: true,
                formatter: '{value} %'
            },
        },
        series : series
    };
    var lineChart = echarts.init(document.getElementById(ele))
    lineChart.setOption(lineOption);
    window.addEventListener("resize", function () {
        lineChart.resize();
    });
}
